package com.example.book.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * (ShopCar)表实体类
 *
 * @author makejava
 * @since 2022-12-02 16:18:35
 */
@SuppressWarnings("serial")
@Data
public class ShopCar extends Model<ShopCar> {

    @TableId(type = IdType.AUTO)
    private Integer id;

    private Integer userId;

    private Integer bookId;

    //购物车转态id
    private  Integer status;

    private String bookCount;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}

